import javax.swing.tree.TreeNode;

public class Tree {

    public void preOrder(TreeNode root){
        if (root == null) return;
        System.out.println(root.val+" ");
        preOrder(root.left);
        preOrder(root.right);
    }
}
